package com.apexwear.apexutils.utils;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.apexwear.apexutils.R;
import com.apexwear.apexutils.ui.MainActivity;

public class ShowToast {
    public static void show(Context mContext, String showTxt) {
        View toastView = LayoutInflater.from(mContext).inflate(R.layout.toast_message, null, false);
        TextView textView = toastView.findViewById(R.id.toast_message);
        textView.setText(showTxt);
        Toast toast = new Toast(mContext);
        toast.setView(toastView);
        toast.setDuration(Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();
    }
}
